package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/12/26
 */
@Entity
@Table(name = "salesman_source_data")
public class SalesmanSourceDataEntity extends BaseEntity{
    private String employeeNo;
    private String mobile;
    private String name;
    private String organizationCode;
    private String isLeadin;

    @Basic
    @Column(name = "employee_no")
    public String getEmployeeNo() {
        return employeeNo;
    }

    public void setEmployeeNo(String employeeNo) {
        this.employeeNo = employeeNo;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "organization_code")
    public String getOrganizationCode() {
        return organizationCode;
    }

    public void setOrganizationCode(String organizationCode) {
        this.organizationCode = organizationCode;
    }

    @Basic
    @Column(name = "is_leadin")
    public String getIsLeadin() {
        return isLeadin;
    }

    public void setIsLeadin(String isLeadin) {
        this.isLeadin = isLeadin;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SalesmanSourceDataEntity that = (SalesmanSourceDataEntity) o;

        if (employeeNo != null ? !employeeNo.equals(that.employeeNo) : that.employeeNo != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (organizationCode != null ? !organizationCode.equals(that.organizationCode) : that.organizationCode != null)
            return false;
        return isLeadin != null ? isLeadin.equals(that.isLeadin) : that.isLeadin == null;
    }

    @Override
    public int hashCode() {
        int result = employeeNo != null ? employeeNo.hashCode() : 0;
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (organizationCode != null ? organizationCode.hashCode() : 0);
        result = 31 * result + (isLeadin != null ? isLeadin.hashCode() : 0);
        return result;
    }
}
